package com.jiyici.controller;

import android.os.AsyncTask;
import android.util.Log;

public abstract class BaseAsyncTask extends AsyncTask<Void, Void, Void> {
    
    private static final String TAG = "jiyici_task";

    @Override
    final protected Void doInBackground(Void... params) {
        _doInBackground();
        Log.i(TAG, getClass().getSimpleName() + ": doInBackground");
        return null;
    }
    
    protected void _doInBackground() {
        
    }

    @Override
    final protected void onCancelled() {
       _onCancelled();
       Log.i(TAG, getClass().getSimpleName() + ": onCancelled");
    }
    
    protected void _onCancelled() {
        
    }

    @Override
    final protected void onPostExecute(Void result) {
        _onPostExecute();
        Log.i(TAG, getClass().getSimpleName() + ": onPostExecute");
    }
    
    protected void _onPostExecute() {
        
    }
    

    @Override
    final protected void onPreExecute() {
        _onPreExecute();
        Log.i(TAG, getClass().getSimpleName() + ": onPreExecute");
    }
    
    protected void _onPreExecute() {
        
    }

    @Override
    final protected void onProgressUpdate(Void... values) {
        _onProgressUpdate();
        Log.i(TAG, getClass().getSimpleName() + ": onProgressUpdate");
    }
    
    protected void _onProgressUpdate() {
        
    }

}
